package com.test.learnaidl.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

import androidx.annotation.Nullable;

import com.test.learnaidl.binderimp.BinderPoolImpl;

public class AIDLBinderPoolService extends Service {
    private static final String TAG = "AIDLBinderPoolService -> ";
    private BinderPoolImpl mBinderPool = new BinderPoolImpl();

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return mBinderPool;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Log.i("==", TAG + "onCreate period");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Log.i("==", TAG + "onStartCommand period");

        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        Log.i("==", TAG + "onDestroy period");

        super.onDestroy();
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.i("==", TAG + "onUnbind period");

        return super.onUnbind(intent);
    }

    @Override
    public void onRebind(Intent intent) {
        super.onRebind(intent);
        Log.i("==", TAG + "onRebind period");

    }
}
